home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 5
/
Hottest 5 (1995)(PDSoft)[!].iso
/
pdsoft
/
library
/
lha
/
tma.lha
/
TMA_Installer
< prev
next >
Wrap
Text File
|
1980-11-24
|
2KB
|
99 lines
;
; My first ever CLI script, so bear with me if you will!
; Started on 31/10/94, went okay until 1/10/94 then it all went wrong
; error: assign failed return code 20 (or something?!)
; so later that evening, I started from scratch and
; 20 mins later you can see the results below...
; A craply written CLI script if I may say sooooooooo!!
; by Matthew Wilsher (c)opyright 1994
; Revised on 6/11/94 at 11:26am
;
.key test/s,full/s
Echo "*Ec*N*E[1m TMA Installation*N"
Echo " by Matthew Wilsher"
Echo "*E[0m"
.bra [
.ket ]
Lab destloop
Echo "Enter destination for TMA (or Abort to quit) :- " noline
Set >NIL: destin ?
Echo " "
IF "$destin" EQ "Abort"
Skip exit
ENDIF
IF "${destin}" EQ "TMA:"
Echo "Error: cannot install TMA to the TMA disk!*N"
Skip back destloop
ENDIF
Assign destin: "${destin}"
Assign >NIL: exists destin:
IF WARN
Echo "Error: partition does not exist.*N"
Skip back destloop
ENDIF
; not too bad so far, eh?
Lab destok
Echo "Making directory 'TMA' in destination..."
IF EXISTS destin:TMA
Echo "Directory already exists..."
Skip staTMA
ELSE
Makedir destin:TMA
ENDIF
Lab staTMA
Copy TMA:Icons/TMA.info to destin:TMA.info
Echo "Copying main file to destination..."
Copy TMA:TMA to destin:TMA/
Copy TMA:TMA.info to destin:TMA/
Echo "Making directory 'New_Data' in TMA directory..."
IF EXISTS destin:TMA/New_Data
Echo "New_Data directory already exists..."
Skip copynd
ELSE
Makedir destin:TMA/New_Data
ENDIF
Lab copynd
Echo "Now copying all data from TMA disk to 'New_Data' directory..*N"
Copy all TMA:New_Data/ to destin:TMA/New_Data QUIET
Echo "All copying finished..."
IF EXISTS s:TMA.source
Echo "Deleting current s:TMA.source..."
Delete s:TMA.source QUIET
ELSE
Echo "Now creating TMA.source file in 'S' directory...*N"
Echo "${destin}TMA/New_Data/" >>s:TMA.source
Skip endTMA
ENDIF
Echo "Now creating TMA.source file in 'S' directory*N"
Echo "${destin}TMA/New_Data/" >>s:TMA.source
Lab endTMA
Echo "All finished, now reboot and run 'TMA'*N"
Wait 1
Endcli
Lab exit
Echo "Okay, exiting around now..."
Wait 1
Endcli
;
; god I'm sick of all this crap!
; -Matthew Wilsher 1994
;